<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import request from "@/utils/request.js";
import { setToken } from "@/utils/storage.js";

export default {
  async created() {
    const res = await request.post("/user/registered", {
      username: "shuaipeng4",
      password: "123456",
    });
    setToken(res.data.token);
    console.log(res);
  },
};
</script>

<style lang="less"></style>
